<!-- 采购合同申请 -->
<template>
	<view>
		<u-sticky>
			<u-tabs
				class="tabs" 
				:list="tabsList" 
				@click="onTabClick" 
				:scrollable="true"
				 :style="!isSticky?'padding: 0 24rpx;background: #FFF;z-index:22;position: sticky;top:'+inputHeight+'px;':'width:750rpx;z-index:22;position: sticky;top:'+inputHeight+'px'"
				:activeStyle="{color:'#171717', fontSize: '14px'}"
				:inactiveStyle="{color:'#C6C6C6', fontSize: '14px'}"
				lineColor="#1E6FFF"
			></u-tabs>
		</u-sticky>
		<collapse name="供方信息" id="outside3" :maxHeight="maxHeight3">
			<view class="listdefault" :id="uId3">
				<view class="action" v-for="(item,key) in supplierInfo" :key="key">
					<view class="list1">{{ key }}</view>
					<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
					<view class="list2" v-else>{{ detailData[item] }}</view>
				</view>
			</view>
		</collapse>
		<view class="task_lists" :style="{ paddingBottom: tabvalue == '待办'?'130rpx':'0' }">
			<collapse name="基本信息" id="outside1" :maxHeight="maxHeight1">
				<view class="listdefault" :id="uId1">
					<view class="action" v-for="(item,key) in basicInfo" :key="key">
						<view class="list1">{{ key }}</view>
						<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
						<h-dictCode class="list2" v-else-if="item == 'invoiceCategory'" :value="detailData[item]" :dictName="'invoice_type'"></h-dictCode>
						<view class="list2" v-else>{{ detailData[item] }}</view>
					</view>
					<view class="action">
						<view class="list1">签订日期</view>
						<view class="list2">{{ detailData.signingDate }}</view>
					</view>
					<view class="action" v-if="detailData.calibrationNo">
						<view class="list1">关联单据</view>
						<view class="list2">{{ detailData.calibrationNo }}</view>
					</view>
					<view class="action">
						<view class="list1">定点合同</view>
						<view class="list2">{{ detailData.isFixedTime_dictText }}</view>
					</view>
					<view class="action" v-if="detailData.isFixedTime == 1">
						<view class="list1">到期日期</view>
						<view class="list2">{{ detailData.expireTime }}</view>
					</view>
					<view class="action" v-for="(item,key) in basicInfo1" :key="item">
						<view class="list1">{{ key }}</view>
						<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
						<h-dictCode class="list2" v-else-if="item == 'invoiceCategory'" :value="detailData[item]" :dictName="'invoice_type'"></h-dictCode>
						<view class="list2" v-else>{{ detailData[item] }}</view>
					</view>
					<view class="action" v-if="detailData.isUseSeal == '1'">
						<view class="list1">用印类型</view>
						<view class="list2">{{ detailData.signSealWay_dictText }}</view>
					</view>
					<view class="action"  v-if="detailData.isUseSeal == '1' && detailData.signSealWay == 'online'">
						<view class="list1">对方是否电子签章</view>
						<view class="list2">{{ detailData.isSignSeal_dictText }}</view>
					</view>
					<view class="action"  v-if="detailData.isUseSeal == '1' && detailData.signSealWay == 'online' && detailData.isSignSeal == 1">
						<view class="list1">对方盖章人</view>
						<view class="list2">{{ detailData.supplyPsnName }}</view>
					</view>
					<view class="action"  v-if="detailData.isUseSeal == '1' && detailData.signSealWay == 'online' && detailData.isSignSeal == 1">
						<view class="list1">联系方式</view>
						<view class="list2">{{ detailData.supplyPsnMobile }}</view>
					</view>
					
					<view class="action" v-if="detailData.isUseSeal == '1'">
						<view class="list1">印章类型</view>
						<view class="list2">{{ detailData.sealType_dictText }}</view>
					</view>
					<view class="action" v-if="detailData.isUseSeal == '1'">
						<view class="list1">用印份数</view>
						<view class="list2">{{ detailData.useSealNumber }}</view>
					</view>
				</view>
			</collapse>
			<collapse name="需方信息" id="outside2" :maxHeight="maxHeight2">
				<view class="listdefault" :id="uId2">
					<view class="action" v-for="(item,key) in demanderInfo" :key="key">
						<view class="list1">{{ key }}</view>
						<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
						<view class="list2" v-else>{{ detailData[item] }}</view>
					</view>
					<view class="action" v-if="detailData.isUseSeal == '1' && detailData.signSealWay == 'online'">
						<view class="list1">我方经办人</view>
						<view class="list2">{{ detailData.psnName }}</view>
					</view>
					<view class="action" v-if="detailData.isUseSeal == '1' && detailData.signSealWay == 'online'">
						<view class="list1">联系方式</view>
						<view class="list2">{{ detailData.psnMobile }}</view>
					</view>
				</view>
			</collapse>
			
			<!-- <collapse name="交接信息" id="outside4">
				<view class="listdefault">
					<view class="action" v-for="(item,key) in handoverInfo" :key="key">
						<view class="list1">{{ key }}</view>
						<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
						<view class="list2" v-else>{{ detailData[item] }}</view>
					</view>
				</view>
			</collapse> -->
			<collapse name="其他信息" id="outside5" :maxHeight="maxHeight5">
				<view class="listdefault" :id="uId5">
					<view class="action" v-for="(item,key) in otherInfo" :key="key">
						<view class="list1">{{ key }}</view>
						<h-dictCode class="list2" v-if="item == 'invoiceManner'" :value="detailData[item]" :dictName="'make_invoice_type'"></h-dictCode>
						<view class="list2" v-else>{{ key == '项目所在地址'?detailData.ssq + detailData.projectAddress :detailData[item] }}</view>
					</view>
				</view>
			</collapse>
			<action-collapse name="付款信息" :childFields="childFields" id="outside6" :dataSource="childSource"></action-collapse>
			<action-collapse name="物料信息" :childFields="childFieldsUnit" id="outside7" :dataSource="childSourceUnit" ></action-collapse>
			<default-list name="用印文件" v-if="detailData.signFile && detailData.isUseSeal == 1">
				<file-list :fileList="detailData.signFile"></file-list>
			</default-list>
			<default-list name="合同原件扫描件">
				<file-list :fileList="detailData.contractOrgFile"></file-list>
			</default-list>
			<default-list name="相关附件">
				<file-list :fileList="detailData.purchaseFile"></file-list>
			</default-list>
			<default-list name="流程图" id="outside8">
				<template slot="right">
					<view class="flow_right" @click="flowView">
						<image src="../../static/synergy/viewflow.png" mode="aspectFill"></image>
						<text>流程图</text>
					</view>
				</template>
				<flow-list :dataSource="resultList"></flow-list>
			</default-list>
		</view>
		<view class="task_bottom" v-if="tabvalue == '待办'">
			<view class="task_bottom_write" @click="approval">
				<image src="../../static/synergy/write_commont.png" mode="aspectFill"></image>
				<text>审批</text>
			</view>
			<view class="refuse" @click="refuseProcess" v-if="nodeObj.isSubmit !== '1'">退回</view>
			<view class="agree" @click="agreeProcess" :style="{flex: nodeObj.isSubmit == '1'?1:'initial',margin: nodeObj.isSubmit == '1'?'0 20rpx':''}">同意</view>
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>
<script>
	import http from '@/utils/request/index'
	import actionCollapse from './components/actionCollapse.vue'
	import detailInformationList from './components/detailInformationList.vue'
	import fileList from './components/fileList.vue'
	import collapse from './components/collapse.vue'
	import defaultList from './components/defaultList.vue'
	import flowList from './components/flowList.vue'
	import {
		queryByIdPurchaseContract, // 查看采购合同基本信息
		queryByIdPurchaseContractPayAllList, // 查看采购合同付款信息
		queryByIdPurchaseContractSuppliesAllList, // 查看采购合同物料信息
		getProcessTaskTransInfo, // 查询流程流转信息
		getProcessHistoryList, // 查询流程图信息
		getProcessHistoryTaskList, // 查询历史流程图信息
		getNodePositionInfo, // 查询坐标信息数据
		rejectProcess, // 退回
		processComplete // 提交完成
	} from '@/api/index.js'
	import {
		BASE_URL
	} from '@/utils/baseUrl.js'
	export default {
		data() {
			return {
				tabsList: [
					{ name: '供方信息',id: 'outside3' },
					{ name: '基本信息',id: 'outside1' },
					{ name: '需方信息',id: 'outside2' },
					// { name: '交接信息',id: 'outside4' },
					{ name: '其他信息',id: 'outside5' },
					{ name: '付款信息',id: 'outside6' },
					{ name: '物料信息',id: 'outside7' },
					{ name: '流程',id: 'outside8' },
				],
				inputHeight: 0,
				isSticky: false, //tabs是否吸顶
				detailData: {}, // 详情数据
				dictOptions: {}, // 数据字典数据
				basicInfo: {
					'单据编号': 'purchaseBill',
					'申请人': 'proposer_dictText',
					'申请时间': 'createTime',
					'申请部门': 'proposerDeptId_dictText',
					'申请人所属团队': 'applyTeam_dictText',
					'合同名称': 'contractName',
					'采购类型': 'procurementType_dictText', // 升级版迭代1
				},
				basicInfo1: {
					'合同总额(元)': 'totalAmount',
					'发票类型': 'invoiceCategory',
					'税率(%)': 'taxRate',
					'税费(元)': 'expensesTaxation',
					
					// '货期': 'deliveryTime',
					// '货期单位': 'deliveryTimeUnit_dictText',
					// '运输方式': 'modeTransportation_dictText',
					// '运输费承担方': 'trafficExpense_dictText',
					'费用所属团队': 'teamId_dictText',
					'是否工程类': 'isEngineering_dictText',
					'是否用印': 'isUseSeal_dictText',
					
				},
				
				// 需方信息
				demanderInfo: {
					'公司名称': 'demandCompanName_dictText',
					// '公司地址': 'demandCompanyAddress',
					// '委托代理人': 'demandEntrustedAgent',
					// '手机号码': 'demandPhoneNumber',
					// '开户银行': 'demandBankName',
					// '银行账号': 'demandBankAccountNo',
					// '纳税人识别号': 'demandRegistrationNumber',
				},
				// 供方信息
				supplierInfo: {
					'供应商名称': 'supplyCompanName_dictText',
					'公司地址': 'supplyCompanyAddress',
					'委托代理人': 'supplyEntrustedAgent',
					'手机号码': 'supplyPhoneNumber',
					'开户银行': 'supplyBankName',
					'银行账号': 'supplyBankAccountNo',
					'纳税人识别号': 'supplyRegistrationNumber',
				},
				// 交接信息
				// handoverInfo: {
				// 	'交接地址': 'deliveryAddress',
				// 	'收货人': 'consignee',
				// 	'收货人电话': 'phoneNumber',
				// 	'发票邮寄地址': 'invoiceAddress',
				// 	'发票收件人': 'invoiceConsignee',
				// 	'发票收货人电话': 'invoiceNumber',
				// },
				// 其他信息
				otherInfo: {
					// '验收条款': 'inspectionClaus',
					'备注': 'remark',
				},
				childFields: { // 子表字段
					'合同款项': 'contractPayment_dictText',
					'付款比例(%)': 'ratioPayment',
					'付款金额(元)': 'paymentAmount',
					'备注': 'remark',
				},
				childFieldsUnit: { // 子表字段
					'采购大类': 'provisionBroad_dictText',
					'采购小类': 'provisionSmall_dictText',
					'物料编号': 'materialBillId',
					'物料名称': 'materialName_dictText',
					'品牌': 'brand',
					'规格型号': 'specification',
					'单位': 'unit_dictText',
					'数量': 'amount',
					'单价(元)': 'unitPrice',
					'总价(元)': 'totalPrices',
					'备注': 'remark',
				},
				childSource: [], // 字表数据
				childSourceUnit: [], // 字表单位数据
				resultList: [], // 流程图数据
				nodePositionInfo: {}, // 坐标信息
				processInstanceId: '',
				scrollTop: 0,
				model: {}, // 处理单据表信息
				resultObj: {}, // 流程图流转信息
				nodeObj: {}, // 流程节点信息
				tabvalue: '',
				isClick: false,
				maxHeight1: 0,
				maxHeight2: 0,
				maxHeight3: 0,
				maxHeight5: 0,
				uId1: uni.$u.guid(),
				uId2: uni.$u.guid(),
				uId3: uni.$u.guid(),
				uId5: uni.$u.guid(),
			}
		},
		components: {
			actionCollapse,
			detailInformationList,
			fileList,
			collapse,
			defaultList,
			flowList
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onReady() {
			uni.setNavigationBarTitle({
				title: this.model.bpmBizTitle.replace(/(【|】)/g,'')
			});
		},
		onLoad(options) {
			this.model = JSON.parse(decodeURIComponent(options.item))
			var that = this
			// #ifdef APP-NVUE
				var eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
			// #endif
			// #ifndef APP-NVUE
				var eventChannel = this.getOpenerEventChannel();
			// #endif
			// 监听sendMessage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('sendMessage', function(data) {
				that.tabvalue = data.tabvalue
				that.nodeObj = JSON.parse(decodeURIComponent(data.nodeObj))
				that.loadData(that.nodeObj.dataId)
				that.getapplyAllList()
				that.getNodePositionInfoData(that.model.processInstanceId)
				if (this.tabvalue == '待办') {
					that.getProcessTaskTrans(that.model.id)
				}
				// that.initDictConfig()
			})
		},
		methods: {
			// 点击进入审批页面
			approval(){
				if(this.isClick){
					return
				}
				var that = this
				var nextnode = ''
				if(this.resultObj.transitionList){
					this.resultObj.transitionList.forEach(item => {
						nextnode += ',' + item.nextnode
					})
				}
				uni.navigateTo({
					url:'/pages/synergy/approval',
					success: function(res) {
						// 通过eventChannel向被打开页面传送数据
						res.eventChannel.emit('acceptDataFromOpenerPage', {
							nodeObj: encodeURIComponent(JSON.stringify(that.nodeObj).replace(/%/g, '%25')),
							model: encodeURIComponent(JSON.stringify(that.model).replace(/%/g, '%25')),
							nextnode: nextnode
						})
					}
				})
			},
			// 查询流程流转信息 -- 获取下一节点信息
			getProcessTaskTrans(taskId){
				getProcessTaskTransInfo({ taskId }).then(res => {
					if(res.success){
						this.resultObj = res.result
					} else {
						this.$refs.uToast.show({
							message: res.message,
							type: 'error'
						})
					}
				}).catch(err => {
					console.log(err);
				})
			},
			// 查询预立项申请详情
			async loadData(id){
				queryByIdPurchaseContract({ id }).then(async res => {
					if(res.success){
						this.getapplyAllListUnit()
						this.getPurchaseBill(res.result)
						this.detailData =  res.result
						this.$nextTick(() => {
							// if(this.detailData.isUseSeal==0){
							// 	this.$delete(this.basicInfo,'印章类型')
							// 	this.$delete(this.basicInfo,'用印份数')
							// } else {
							// 	this.basicInfo['印章类型'] = 'sealType_dictText'
							// 	this.basicInfo['用印份数'] = 'useSealNumber'
							// }
						})
						
						this.timer = setTimeout(() => {
							clearTimeout(this.timer)
							this.timer = null
							this.$nextTick(() => {
								uni.createSelectorQuery().select('#'+this.uId1).boundingClientRect(data => {
									this.maxHeight1 = data.height
								}).exec();
								uni.createSelectorQuery().select('#'+this.uId2).boundingClientRect(data => {
									this.maxHeight2 = data.height
								}).exec();
								uni.createSelectorQuery().select('#'+this.uId3).boundingClientRect(data => {
									this.maxHeight3 = data.height
								}).exec();
								uni.createSelectorQuery().select('#'+this.uId5).boundingClientRect(data => {
									this.maxHeight5 = data.height
								}).exec();
							})
						},300)
						
					} else {
						this.$refs.uToast.show({
							message: res.message,
							type: 'error'
						})
					}
				})
			},
			
			// 查看单据编号
			getPurchaseBill (res) {
				this.$set(this.detailData,'calibrationNo','');
				if (res.associationBillId){
					if (res.procurementType === '1'){
						//根据ID获取定标结果确认单单号 用于穿透
						http.get('/api/erp/purchase/procurement/erpPurchaseCalibration/queryById',{id:res.associationBillId}).then(res=>{
							this.$set(this.detailData,'calibrationNo',res.result.purchaseBill);
						})
					}else if (res.procurementType === '2'){
						//根据ID获取采购申请单单号 用于穿透
						http.get('/api/erp/purchase/procurement/erpPurchaseApplyForm/queryById',{id:res.associationBillId}).then(res=>{
							this.$set(this.detailData,'calibrationNo',res.result.purchaseBill);
						})
					}else if (res.procurementType === '3'){
						//根据ID获取招标采购单信息单号 用于穿透
						http.get('/api/erp/purchase/procurement/erpPurchaseApplyInvitation/queryById',{id:res.associationBillId}).then(res=>{
							this.$set(this.detailData,'calibrationNo',res.result.purchaseBill);
						})
					} else {
						this.$set(this.detailData,'calibrationNo', '');
					}

				}
			},
			// 查看字表
			getapplyAllList () {
				var params ={
					column: 'createTime',
					order: 'desc',
					pageNo: 1,
					pageSize: 100,
					billId: this.nodeObj.dataId
				}
				queryByIdPurchaseContractPayAllList(params).then(res => {
					if(res.success){
						this.childSource = res.result || []
					}
				})
			},
			// 查看子表单位数据
			getapplyAllListUnit () {
				var params ={
					column: 'createTime',
					order: 'desc',
					pageNo: 1,
					pageSize: 100,
					billId: this.nodeObj.dataId
				}
				queryByIdPurchaseContractSuppliesAllList(params).then(res => {
					if(res.success){
						if (res.result && res.result.length) {
							res.result.map(value => {
								value.totalPrices =  value.amount && value.unitPrice ? (Number(value.amount) * Number(value.unitPrice)).toFixed(2) : '0.00'
								return value
							})
						}
						this.childSourceUnit = res.result || []
					}
				})
			},
			// 查询流程节点信息 -- 流程图数据
			getProcessHistoryListS(processInstanceId){
				var url = ''
				var params = ''
				url = getProcessHistoryList
				params = {
					processInstanceId: processInstanceId
				}
				
				url(params).then((res)=>{
					if(res.success){
						this.resultList = res.result.records;
					} else {
						this.$refs.uToast.show({
							message: res.message,
							type: 'error'
						})
					}
				})
			},
			// 查询坐标信息数据 -- 流程图备注
			getNodePositionInfoData(processInstanceId) {
				getNodePositionInfo({ processInstanceId }).then(res => {
					if (res.success) {
						this.nodePositionInfo = res.result
						this.getProcessHistoryListS(processInstanceId)
					} else {
						this.$refs.uToast.show({
							message: res.message,
							type: 'error'
						})
					}
				}).catch(e => {
					console.error(e)
				})
			},
			// 流程图预览
			flowView(){
				var params = `_t=${Date.parse(new Date()) / 1000}&processInstanceId=${this.model.processInstanceId}`
				var url = `${BASE_URL}/api/erpmng/act/task/traceImage?${params}`
				this.viewImage(url)
			},
			// 预览图片
			viewImage(url){
				uni.previewImage({
					urls: [url],
					longPressActions: {
						itemList: ['保存图片'],
						success: function(data) {
							uni.downloadFile({
								url: url,
								success: (result) => {
									if (result.statusCode === 200) {
										//文件保存到本地
										uni.saveFile({
											tempFilePath: result.tempFilePath, //临时路径
											success: function(ress) {
												uni.showToast({
													icon: 'none',
													mask: true,
													title: '文件已保存：' + ress.savedFilePath, //保存路径
													duration: 3000,
												});
											}
										});
									}
								},
								fail: (err) => {
									uni.showToast({
										icon: 'none',
										mask: true,
										title: '失败请重新下载',
									});
								}
							})
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				})
			},
			// 点击tabs
			onTabClick (item) {
				uni.createSelectorQuery().in(this).select(`#${item.id}`).boundingClientRect(data => {
					uni.pageScrollTo({
						scrollTop:data.top + this.scrollTop - 54,
						duration: 150
					})
				 }).exec();
			},
			// 拒绝流程
			refuseProcess(){
				var that = this
				var nextnode = ''
				if(this.resultObj.transitionList){
					this.resultObj.transitionList.forEach(item => {
						nextnode += ',' + item.nextnode
					})
				}
				uni.navigateTo({
					url:'/pages/synergy/approval',
					success: function(res) {
						// 通过eventChannel向被打开页面传送数据
						res.eventChannel.emit('acceptDataFromOpenerPage', {
							nodeObj: encodeURIComponent(JSON.stringify(that.nodeObj).replace(/%/g, '%25')),
							model: encodeURIComponent(JSON.stringify(that.model).replace(/%/g, '%25')),
							resultObj: encodeURIComponent(JSON.stringify(that.resultObj).replace(/%/g, '%25')),
							nextnode: nextnode,
							noAgree: '1'
							
						})
					}
				})
			},
			// 同意流程
			agreeProcess(){
				if(this.isClick){
					this.$refs.uToast.show({
						message: '请勿重复点击！',
						type: 'default'
					})
					return
				}
				var nextnode = ''
				if(this.resultObj.transitionList){
					this.resultObj.transitionList.forEach(item => {
						nextnode += ',' + item.nextnode
					})
				}
				this.isClick = true
				
				var _this = this
				uni.showModal({
					content: '该任务将同意审批，是否继续？',
					cancelText: '否',
					confirmText: '是',
					confirmColor: '#576B95',
					cancelColor: '#000000',
					success: function (res) {
						if (res.confirm) {
							
							var params = {
								bizTaskList: "[]",
								ccUserIds: "",
								ccUserRealNames: "",
								fileList: "[]",
								isSubmit: _this.nodeObj.isSubmit,
								method: "post",
								nextCodeCount: "",
								nextUserId: "",
								nextUserName: "",
								nextnode: nextnode?nextnode.substring(1):'',
								procInsId: _this.model.processInstanceId,
								processModel: 1,
								reason: "同意",
								rejectModelNode: "",
								taskId: _this.model.id,
							}
							processComplete(params).then(res => {
								_this.$refs.uToast.show({
									message: res.message,
									type: res.success?'success':'error',
									duration: 1000,
									complete() {
										if(res.success) uni.switchTab({url: '/pages/synergy/synergy'});
										_this.isClick = false
									}
								})
							}).catch(err => {
								_this.isClick = false
							})
						} else if (res.cancel) {
							_this.show = false
							_this.isClick = false
						}
					}
				});
			}
		}
	}
</script>
<style lang="scss" scoped>
@import "./common/action.scss";
.task_lists{
	padding: 20rpx 20rpx 0;
}
.image_lists{
	padding: 0 0 12rpx 12rpx;
	display: flex;
	flex-wrap: wrap;
	.image_list{
		margin-bottom: 20rpx;
		width: 144rpx;
		margin-right: 14rpx;
		.image_img{
			width: 116rpx;
			height: 116rpx;
			padding: 12rpx;
			background: rgba(0,0,0,0.0200);
			border-radius: 1px;
			border: 1px solid rgba(0,0,0,0.0800);
			position: relative;
			.image_action{
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translateX(-50%) translateY(-50%);
				width: 36rpx;
				height: 36rpx;
			}
			.image_source{
				width: 100%;
				height: 100%;
			}
		}
		.image_name{
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #B2B2B2;
			line-height: 28rpx;
			margin-top: 8rpx;
			text-align: left;
		}
	}
}

.flow_right{
	display: flex;
	align-items: center;
	image{
		width: 40rpx;
		height: 40rpx;
	}
	text{
		font-size: 14px;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #1E6FFF;
		line-height: 40rpx;
		margin-left: 4rpx;
	}
}

.task_bottom{
	display: flex;
	align-items: center;
	padding: 20rpx 0 20rpx 52rpx;
	background-color: #FFFFFF;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 10000;
	.task_bottom_write{
		display: flex;
		align-items: center;
		image{
			width: 48rpx;
			height: 48rpx;
			margin-right: 8rpx;
		}
		text{
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #7F7F7F;
			line-height: 40rpx;
		}
	}
	.refuse{
		width: 168rpx;
		height: 90rpx;
		line-height: 90rpx;
		background: rgba(0,0,0,0.0500);
		border-radius: 10rpx;
		margin: 0 16rpx 0 52rpx;
		font-size: 34rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(0,0,0,0.5000);
		text-align: center;
	}
	.agree{
		width: 318rpx;
		height: 90rpx;
		line-height: 90rpx;
		background: #1E6FFF;
		border-radius: 10rpx;
		font-size: 34rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
	}
}
</style>